package vo
{
	import global.Define;
	public class TableInfo
	{
		public var wSiteID:int;							//桌子号码
		public var wTableID:int;							//桌子号码
		public var bTableLock:int;							//锁定状态
		public var bPlayStatus:int;						//游戏状态
		public var bAllowLookon:Boolean;					//运行旁观
		public var szTablePass:String = "";
		public var userStatus:Array = [];
		public function TableInfo()
		{
			reset();
		}
		public function reset():void
		{
			wSiteID = -1;
			wTableID = -1;
			bTableLock = -1;
			bPlayStatus = -1;
			bAllowLookon = false;
			userStatus.length = 0;
		}
		public function getChairID(dwUserID:uint):int
		{
			var chairID:int = -1;
			for(var i:uint = 0; i < Define.GAME_PLAYER; i++)
			{
				if(userStatus[i] && userStatus[i].dwUserID == dwUserID)
				{
					chairID = i;
					break;
				}
			}
			return chairID;
		}
	}
}